package cn.edu.neusoft.yyd208.foodorder.adapter;

import android.content.Context;
import android.support.v7.widget.RecyclerView;

import java.util.List;

import cn.edu.neusoft.yyd208.foodorder.bean.CommentFoodBean;


public class UserOrderAdapter extends CommentBaseAdapter<CommentFoodBean> {
    public UserOrderAdapter(Context context, List<CommentFoodBean> items, int layoutResource) {
        super(context, items, layoutResource);
    }


    @Override
    public void onBindViewHolder(RecyclerView.ViewHolder holder, final int position) {
        CommentViewHolder myViewHolder=(CommentViewHolder)holder;
        final String username=items.get(position).getUsername();
        final String num=items.get(position).getNum();
        final String foodname=items.get(position).getFoodname();
        final String orderid=items.get(position).getOrder_id();
        final String commenttime=items.get(position).getComment_time();
       //final String foodimg=items.get(position).getPic();
        myViewHolder.tv_cusername.setText(username);
        myViewHolder.et_content.setText(num);
        myViewHolder.tv_cfoodname.setText(foodname);
        myViewHolder.tv_corderid.setText(orderid);
        myViewHolder.tv_ccommenttime.setText(commenttime);
       // Picasso.with(context).load(items.get(position).getPic()).into(myViewHolder.img_shop);
       /* myViewHolder.itemView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Log.i("TEST", "onClick: ");
                Intent intent=new Intent(context, FoodInfoActivity.class);
                //Bundle bundle=new Bundle();
                intent.putExtra("id",id);
                intent.putExtra("foodname",foodname);
                intent.putExtra("foodprice",foodprice);
                intent.putExtra("foodintro",foodintro);
                //bundle.putInt("foodimg", foodimg);
                //intent.putExtras(bundle);
                intent.putExtra("foodimg",foodimg);
                intent.putExtra("foodid",foodid);
                context.startActivity(intent);
            }
        });*/

    }

}
